<h1>Listing filters</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Description</th>
    <th>Body</th>
    <th>Screenshot</th>
  </tr>

<% for filter in @filters %>
  <tr>
    <td><%=h filter.title %></td>
    <td><%=h filter.description %></td>
    <td><%=h filter.body %></td>
    <td><%=h filter.screenshot %></td>
    <td><%= link_to 'Show', filter_path(filter) %></td>
<% if current_user.admin == true %>
    <td><%= link_to 'Edit', edit_filter_path(filter) %></td>
    <td><%= link_to 'Destroy', filter_path(filter), :confirm => 'Are you sure?', :method => :delete %></td>
    <td> <%= link_to_remote 'Approve', :url => { :action => 'approve', :id => filter.id } %></td>
<% end %>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New filter', new_filter_path %>
